package io.renren.modules.pullin.service.impl;

import io.renren.modules.jxgk.entity.CollegeInfoEntity;
import io.renren.modules.jxgk.entity.ElectiveCourseEntity;
import io.renren.modules.jxgk.entity.TeacherInfoEntity;
import io.renren.modules.pullin.dao.PullOutDao;
import io.renren.modules.pullin.entity.ClassCourse;
import io.renren.modules.jxgkphone.entity.StudentInfo;
import io.renren.modules.pullin.service.PullOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PullOutServiceImpl implements PullOutService {
    @Autowired
    PullOutDao pullOutDao;
    public void insertClassCourse(ClassCourse classCourse){
        pullOutDao.insertClassCourse(classCourse);
    }
    public List<ClassCourse> findClassCourseByClassNameAndCourseId(String class_name, String course_school_id){
        return  pullOutDao.findClassCourseByClassNameAndCourseId(class_name,course_school_id);
    }
    public void DeleteClassCourseByClassNameAndCourseId(String class_name,String course_school_id){
        pullOutDao.DeleteClassCourseByClassNameAndCourseId(class_name,course_school_id);
    }
    public void insertStudentInfo(StudentInfo studentInfo){
        pullOutDao.insertStudentInfo(studentInfo);
    }
    public StudentInfo findStudentInfoByStudentId(String sid){
        StudentInfo s=pullOutDao.findStudentInfoByStudentId(sid);
        return s;
    }
    public void insertTeacher(TeacherInfoEntity t){
        pullOutDao.insertTeacher(t);
    }
    public TeacherInfoEntity findTeacherInfobyTeacherId(String teacher_id){
        return pullOutDao.findTeacherInfobyTeacherId(teacher_id);
    }
    public void deleteTeacherInfoByTeacherId(String teacher_id){
       pullOutDao.deleteTeacherInfoByTeacherId(teacher_id);
    }
    //选修课
    public void insertElectiveCourse(ElectiveCourseEntity t){
        pullOutDao.insertElectiveCourse(t);
    }
    public List<ElectiveCourseEntity> findElectiveCourseByStudentIdAndCourseTime(String studentId, String courseTime){
        return pullOutDao.findElectiveCourseByStudentIdAndCourseTime(studentId,courseTime);
    }
    public void DeleteElectiveCourseByStudentIdAndCourseTime( String studentId,String courseTime){
        pullOutDao.DeleteElectiveCourseByStudentIdAndCourseTime(studentId,courseTime);
    }
    public void deleteStudentInfoByStudentId(String studentSchoolId){
        pullOutDao.deleteStudentInfoByStudentId(studentSchoolId);
    }
    public void InsertClassInfo(){
        pullOutDao.InsertClassInfo();
    }
    public void DeleteClassInfo(){
        pullOutDao.DeleteClassInfo();
    }
    public CollegeInfoEntity findCollegeInfobyCollegeCode(String collegeCode){
        return pullOutDao.findCollegeInfobyCollegeCode(collegeCode);
    }
    public void insertCollege(CollegeInfoEntity collegeInfoEntity){
        pullOutDao.insertCollege(collegeInfoEntity);
    }
    public void deleteCollegeInfoByCollegeCode(String collegeCode){
        pullOutDao.deleteCollegeInfoByCollegeCode(collegeCode);
    }
    public CollegeInfoEntity findCollegeInfoCopybyCollegeCode(String collegeCode){
        return  pullOutDao.findCollegeInfoCopybyCollegeCode(collegeCode);
    }
    public void insertCollegeCopy(CollegeInfoEntity collegeInfoEntity){
        pullOutDao.insertCollegeCopy(collegeInfoEntity);
    }
    public void deleteCollegeInfoCopyByCollegeCode(String collegeCode){
        pullOutDao.deleteCollegeInfoCopyByCollegeCode(collegeCode);
    }
}
